home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / search.dxr / 00068_scrolling menu background.ls < prev    next >
Encoding:
Text File  |  2000-01-18  |  841 b   |  27 lines

  1. on mouseDown
  2.   menuRect = the rect of sprite the clickOn
  3.   ClickV = (the clickLoc).locV
  4.   fieldMemberNum = the memberNum of sprite (the clickOn + 1)
  5.   lineHeight = the textHeight of member fieldMemberNum
  6.   if (ClickV - menuRect.top) < 20 then
  7.     repeat while the stillDown
  8.       top = member(fieldMemberNum).scrollTop
  9.       member(fieldMemberNum).scrollTop = max(0, top - lineHeight)
  10.       wait(15)
  11.     end repeat
  12.   else
  13.     if (menuRect.bottom - ClickV) < 20 then
  14.       R = the rect of sprite (the clickOn + 1)
  15.       sHeight = R.bottom - R.top
  16.       diff = member(fieldMemberNum).height - sHeight
  17.       repeat while the stillDown
  18.         top = member(fieldMemberNum).scrollTop
  19.         if top < diff then
  20.           member(fieldMemberNum).scrollTop = top + lineHeight
  21.         end if
  22.         wait(15)
  23.       end repeat
  24.     end if
  25.   end if
  26. end
  27.